package cn.bs.ktv.model;

import android.util.Log;

import com.xuhao.didi.core.iocore.interfaces.IPulseSendable;

import java.nio.charset.StandardCharsets;

/**
 * 心跳数据
 */
public class PulseData implements IPulseSendable {
    private static final long serialVersionUID = -2228570348841486569L;
    private final String logName = PulseData.class.getName();

    public PulseData() {

    }

    @Override
    public byte[] parse() {
        String cmd = Constant.CMD.ECHO;
        StringBuilder sb = new StringBuilder();
        sb.append(cmd).append(Constant.CMD_SPLIT_CHAR);
        sb.append(Constant.END_CHAR);

        String str = sb.toString();
        Log.i(logName, "the send msg is:" + str);
        return str.getBytes(StandardCharsets.UTF_8);
    }
}
